<div class="b-pagename"><h1>Add a gift</h1></div>

<form action="<?=Application::url()?>products/do_add" method="POST" class="b-form" enctype="multipart/form-data">
	<fieldset>
		<legend>Gift details</legend>
		<?=form2_errors($__validation_errors__)?>
		<?=form2_input(array(
				'label' => $this->lang->line('add_form_name'),
				'name' => 'name',
				'value' => set_value('name')));?>
		<?=form2_select(array(
				'label' => 'Category',
				'name' => 'category',
				'options' => $categories)); ?>
		<div id="file_input_container">
			<?=form2_file(array(
					'label' => 'Image',
					'name' => 'image'));?>
		</div>
		<div class="el">
			<div class="label"></div>
			<div class="input">
				<a href="javascript:void(0)" onclick="Products.add_image_upload_input()">+ new image row</a>
			</div>
			<div style="clear: both"></div>
		</div>
		<?=form2_textarea(array(
				'label' => 'Comment',
				'name' => 'comment',
				'value' => set_value('comment'))); ?>
		<?=form2_submit('submit', 'Add'); ?>
	</fieldset>
</form>

<div id="file_input_example" style="display:none">
<?=form2_file(array('label' => 'Image',	'name' => 'image'));?>
</div>
